<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <p><button onclick="createLoader()">createLoader</button></p>

    <p><button onclick="startLoad()" >startLoad</button></p>

    <p><button onclick="stop()">stop</button></p>

    <p><button onclick="destroy()">destroy</button></p>

    <script type="text/javascript" src="app.min.js"></script>
    <script>
        const PlayListLoader = HJPlayer.PlayListLoader;
        const Events = HJPlayer.Events;
        let time = Date.now();

        function createLoader() {
            const loader = new PlayListLoader({
                type: 'm3u8',
                url: 'http://qh1-hls.live.huajiao.com/live_huajiao_v2/_LC_QH1_non_19947618915723931261630292_SX/index.m3u8'
            });

            window.loader = loader;

            loader.on(Events.MANIFEST_PARSED, (e1,) => {
                console.log(e1);
            });
        }

        function startLoad() {
            loader.load();
        } 

        function stop() {
            loader.abort();
        }

        function destroy() {
            loader.destroy();
        }

    </script>
</body>
</html>